package cn.yangliu.nacos.oauth2.config.store;

import java.util.Collection;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

/**
 * An OAuth 2 authentication token can contain two authentications: one for the client and one for the user. Since some
 * OAuth authorization grants don't require user authentication, the user authentication may be null.
 *
 * @author Ryan Heaton
 */
@Data
public class OAuthAuthentication {

    /**
     * current class's static member
     * The constant serialVersionUID.
     */
    private static final long serialVersionUID = -4809832298438307309L;

    /**
     * current class instance's member.
     * The Stored request.
     */
    private OAuthRequest storedRequest;

    /**
     * current class instance's member.
     * The User authentication.
     */
    private OAuthUsernamePasswordAuthenticationToken userAuthentication;

    /**
     * current class instance's member.
     * The Authorities.
     */
    private Collection<GrantedAuthority> authorities;

    /**
     * current class instance's member.
     * The Details.
     */
    private Object details;

    /**
     * current class instance's member.
     * The Authenticated.
     */
    private boolean authenticated = false;



}
